<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .red {
            background-color: red;
        }
        .grow {
            width: 500px;
            height: 500px;
        }
        .box {
            width: 200px;
            height: 200px;
            border: 3px solid ;
        } 
    </style>
</head>
<body>
    <div id="app">
        <!-- v-bind:class -->
        <div class="box" :class="{ grow: true, red : true}"> div</div>
        <div class="box" :class="['red']"> div</div>

        <!-- v-bind:style -->
        <!-- 作用单个style变量而不是一整个类的样式 -->
        <div class="box" :style="{width: '400px', height : '400px'}">style</div>
    </div>


    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
    <script>
        const vue = new Vue({
            el: '#app',
            data: {
                username: '',
                age: 0,
                
            },
            methods: {
               
            }
        })
    </script>
</body>
</html>